Functoid - WeekPatternRanges
WeekPatternRanges Functoid
Some applications make use of a pattern to e.g. determine a schedule for active/non-active weeks. The pattern output exists of 0 (not-active) or 1 (active). This functoid can be used to create a range of 1's and 0's according to an input range of week numbers.
Inputs with their allowed values:
- CompressedWeekPattern This is the range of weeks to make 1 in the pattern. Default it's a 0. The weeks are divided by the '-' sign and afterwards with a ', '. e.g. Week 1 till 4, would become: 1-4. If you would like to have week 1 till 4 and 9 till 12 it becomes: 1-4, 9-12.
- NumberOfWeeks Is used to determine the string length. After the last input (CompressedWeekPattern) 0's (zero's) are added to finish until the end of the string.
Example: